app.controller('timeCtrl',['$scope','$location',function($scope,$location) {
$scope.$on('dateData',function (event, args) {
    console.log(args)
    $scope.dateInput1 = args;
})
    console.log('123')
    $scope.dateInput1 = localStorage.getItem('dateInput');
    $scope.dateInput2 = function () {

    }
    $scope.calendar = new LCalendar();
    $scope.calendar.init({
        'trigger': '#start_date', //标签id
        'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
        'minDate': (new Date().getFullYear()-20) + '-' + 1 + '-' + 1, //最小日期
        'maxDate': (new Date().getFullYear()+20) + '-' + 12 + '-' + 31 //最大日期
    });

    // $scope.calendar = new LCalendar();
    // $scope.calendar.init({
    //     'trigger': '#end_date', //标签id
    //     'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
    //     'minDate': (new Date().getFullYear()-20) + '-' + 1 + '-' + 1, //最小日期
    //     'maxDate': (new Date().getFullYear()+20) + '-' + 12 + '-' + 31 //最大日期
    // });
    switch($location.path()){
        case '/yinhuanluru':
            $scope.holderName = '整改时限';
            break;
        case '/wzgyhxq':
            $scope.holderName = '实际整改日期';
            break;
        case '/yinhuanliuzhuan':
            $scope.holderName = '实际整改日期';
            break;
        case '/baogao':
            $scope.holderName = '日期';
            break;
        case '/yinhuanchaxun':
            $scope.holderName = '日期';
            break;
        case'/bhgzgxq':
            $scope.holderName = '实际整改日期';
            break;
        case'/liuzhuandaichuliyinhuanziye':
            $scope.holderName = '实际整改日期';
            break;

    }
    // if($scope.dateInput){
    //
    // }else{
    //     $scope.dateInput = ''
    // }
    //$scope.niubi =  function (e) { e.preventDefault(); consle.log("niubiniubiniubi")}
}]);